package gui.g2;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;

public class MyGUI extends JFrame {

	public MyGUI() {
		getContentPane().setLayout(new BorderLayout());
		setTitle("Meine GUI");

		setDefaultCloseOperation(EXIT_ON_CLOSE);
		
		JButton button = new JButton("Click me");
		button.setPreferredSize(new Dimension(0,200));
		
		getContentPane().add(button, BorderLayout.SOUTH);
		getContentPane().add(new JButton("Button 2"), BorderLayout.CENTER);
	
		
		
		pack();
		setLocationRelativeTo(null);
	}

	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			@Override
			public void run() {
				JFrame f = new MyGUI();
				f.setVisible(true);
			}
		});
		System.out.println("main endet...");
	}
}
